<?php
	include "config.inc.php";
	$sth = mysql_query(
    	sprintf(
            "SELECT c_id,page_id,page_name FROM pages WHERE c_id = '%s'",
            mysql_real_escape_string($_GET['id'])
    	)
	);

	$pages = array();
	while($r = mysql_fetch_array($sth)) {
		$pages[] = array('id' => $r['page_id'], 'name' => $r['page_name']);
	}
	print json_encode($pages);
	exit;


?>